<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2024/8/17
  Time: 22:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%
        String base = request.getContextPath() + "/";
        String url = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + base;
    %>
    <base href="<%=url%>">
    <script type="text/javascript" src="js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
                var val = $("#q").val();
            $.get("work/sel",{"boo":val}, function (ph) {
                JSON.stringify(ph);
                x(ph);
                $("<td colspan='6'>"+val+"</td>").appendTo("tbody")
            });
        });
        function x(books) {
            $("tbody").empty();
            for (var i = 0; i < books.length; i++) {
                $("<tr>" +
                    "<td>" + books[i].id + "</td>" +
                    "<td>" + books[i].pName + "</td>" +
                    "<td>" + books[i].executor+ "</td>" +
                    "<td>" + books[i].description + "</td>" +
                    "<td>" + books[i].orderLevel + "</td>" +
                    "<td>" + books[i].createDate + "</td>" +

                    "</tr>"
                ).appendTo("tbody");
            }

        }
    </script>
</head>
<body>
<table border="1px">
    <thead>
    <tr>
        <td colspan="6">企业工单列表</td>
    </tr>
    <tr style="background-color: darkred " >
        <td>工单编号</td>
        <td>项目名称</td>
        <td>执行人</td>
        <td>任务描述</td>
        <td>级别</td>
        <td>创建时间</td>
    </tr>
    </thead>
    <tbody>

    </tbody>

</table>
<input type="hidden" id="q" value="<%=request.getParameter("boo")%>"/>
</body>
</html>
